Package-level declarations

Types

Link copied to clipboard
@Serializable
data class BotConfiguration(var identifier: String = "KtGram", var apiHost: String = "https://api.telegram.org", var isTestEnv: Boolean = false, var inputListener: InputListener = InputListenerMapImpl(), var classManager: ClassManager = ClassManagerImpl(), var inputAutoRemoval: Boolean = true, var exceptionHandlingStrategy: ExceptionHandlingStrategy = ExceptionHandlingStrategy.CollectToChannel, var throwExOnActionsFailure: Boolean = false, rateLimiter: RateLimiterConfiguration = RateLimiterConfiguration(), httpClient: HttpConfiguration = HttpConfiguration(), logging: LoggingConfiguration = LoggingConfiguration(), updatesListener: UpdatesListenerConfiguration = UpdatesListenerConfiguration(), commandParsing: CommandParsingConfiguration = CommandParsingConfiguration())

The class containing the bot configuration.

Link copied to clipboard
@Serializable
data class CommandParsingConfiguration(var commandDelimiter: Char = '?', var parametersDelimiter: Char = '&', var parameterValueDelimiter: Char = '=', var restrictSpacesInCommands: Boolean = false, var useIdentifierInGroupCommands: Boolean = false)

Class for configuration of command parsing parameters

Link copied to clipboard
@Serializable
data class CompleteConfig(val token: String, val pckg: String? = null, val configuration: BotConfiguration)
Link copied to clipboard
@Serializable
data class HttpConfiguration(var requestTimeoutMillis: Long? = null, var connectTimeoutMillis: Long? = null, var socketTimeoutMillis: Long? = null, var maxRequestRetry: Int = 3, var retryStrategy: RetryStrategy? = null, var retryDelay: Long = 3000, var proxy: ProxyConfig? = null, var additionalHeaders: Map<String, Any?>? = null)

A class containing the configuration for the bot http client.

Link copied to clipboard
@Serializable
data class LoggingConfiguration(var logger: Logger = DEFAULT_LOGGER, var botLogLevel: LogLvl = LogLvl.INFO, var httpLogLevel: HttpLogLevel = HttpLogLevel.NONE)

The class containing the logging configuration.

Link copied to clipboard
data class RateLimiterConfiguration(var limits: RateLimits = RateLimits(), var mechanism: RateLimitMechanism = TokenBucketLimiterImpl())

Class containing configuration for global rate limiting.

Link copied to clipboard
data class RateLimits(var period: Long = 0, var rate: Long = 0)

A class containing the configuration of constraints for incoming requests.

Link copied to clipboard
@Serializable
data class UpdatesListenerConfiguration(var dispatcher: CoroutineDispatcher = Dispatchers.Default, var processingDispatcher: CoroutineDispatcher = PROCESSING_DISPATCHER, var pullingDelay: Long = 0, var updatesPollingTimeout: Int = 20)

A class containing configurations related to updates pulling.